<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
     <button   id="btn"> 打开新窗口 </button>
   <button   id="btn1"> 关闭新窗口 </button>
</body>
<script>
    var btn = document.getElementById("btn");
    var neWindow;
    var btn1 = document.getElementById("btn1");
    btn.onclick = function(){
     neWindow =   window.open("http://www.edu2act.cn/task/list/" ,"test","width = 400px heigth =400px");
    }
    btn1.onclick = function(){
        neWindow.close();
    }

    </script>
</html>